package com.es.core.controller;

import org.springframework.format.datetime.DateFormatter;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

/**
 * 描述:
 * Old-AgeCareSystem- 日期类型绑定类
 *
 * @author Derek
 * @create 2021-12-03 14:21
 */
public class BaseController {

    @InitBinder
    public void initBinder(WebDataBinder binder){
        binder.addCustomFormatter(new DateFormatter("yyyy-MM-dd HH:mm:ss"));
        binder.addCustomFormatter(new DateFormatter("yyyy-MM-dd"));
    }
}
